import 'package:json_annotation/json_annotation.dart';

part 'share_model.g.dart';

@JsonSerializable()
class SharePageData {
  int? total;
  List<ShareModel>? list;
  SharePageData();

  factory SharePageData.fromJson(Map<String, dynamic> json) =>
      _$SharePageDataFromJson(json);
  Map<String, dynamic> toJson() => _$SharePageDataToJson(this);
}

@JsonSerializable()
class ShareOutPageData {
  int? total;
  List<ShareOutModel>? list;
  ShareOutPageData();

  factory ShareOutPageData.fromJson(Map<String, dynamic> json) =>
      _$ShareOutPageDataFromJson(json);
  Map<String, dynamic> toJson() => _$ShareOutPageDataToJson(this);
}

@JsonSerializable()
class ShareModel {
  int? id;
  int? user_id;
  int? ebike_id;
  int? share_user_id;
  String? phone;
  String? name;
  String? user_name;
  int? share_time;
  String? photo;
  int? created_at;
  int? updated_at;
  int? accepted_at;
  int? status;
  ShareModel();

  factory ShareModel.fromJson(Map<String, dynamic> json) =>
      _$ShareModelFromJson(json);
  Map<String, dynamic> toJson() => _$ShareModelToJson(this);
}

@JsonSerializable()
class ShareOutModel {
  int? ID;
  String? name;
  String? photo;
  int? created_at;
  int? count;
  int? status;
  ShareOutModel();

  factory ShareOutModel.fromJson(Map<String, dynamic> json) =>
      _$ShareOutModelFromJson(json);
  Map<String, dynamic> toJson() => _$ShareOutModelToJson(this);
}
